//
//  RoutePlanningWaiteTopView.m
//  didacar
//
//  Created by 度周末网络-王腾 on 15/12/17.
//  Copyright © 2015年 dzmmac. All rights reserved.
//

#import "RoutePlanningWaiteTopView.h"
#import "UILabel+Yyx.h"
#import "UIScreen+Frame.h"
@implementation RoutePlanningWaiteTopView

+(RoutePlanningWaiteTopView *)getRoutePlanningWaiteTopView{
    RoutePlanningWaiteTopView *routePlanningWaiteTopView = (RoutePlanningWaiteTopView *)[[[NSBundle mainBundle]  loadNibNamed:@"RoutePlanningWaiteTopView" owner:self options:nil] lastObject];
    routePlanningWaiteTopView.frame = CGRectMake(0, 0, [UIScreen width], 165);
    [routePlanningWaiteTopView addSubview:[CommoneTools createLineWithFrame:CGRectMake(10, 85, [UIScreen width] - 20, 0.45)]];
    return routePlanningWaiteTopView;
}

-(void)showHeaderData:(ResponseLineDetailModel *)responseLineDetailModel{
    
    self.startTime.text     = responseLineDetailModel.SendTime;
    self.startLocation.text = responseLineDetailModel.StartStation;
    self.endLocation.text   = responseLineDetailModel.EndStation;
    
    self.price.attributedText = [CommoneTools getBusLinePriceString:responseLineDetailModel.TicketPrice.stringValue isSale:responseLineDetailModel.IsSale salePrice:responseLineDetailModel.SalePrice.stringValue];
    
    
    // 报名样式
    if (responseLineDetailModel.isSignUp == 0) {
        [self.statusLabel statusWaitRegistration];
    }else{
        [self.statusLabel statusRegistration];
    }
    
    self.launchTip.text = [NSString stringWithFormat:@"满%ld人线路优先开通",responseLineDetailModel.WaitNum];
    self.launchName.text = [NSString stringWithFormat:@"%ld人报名",responseLineDetailModel.SignUpNum];
    self.kilometerTime.text = self.launchName.text;
}

@end
